# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Jeff Mickey <jeff@archlinux.org>

pkgname=surfraw
pkgver=2.3.0
pkgrel=3
pkgdesc="Shell Users' Revolutionary Front Rage Against the Web"
arch=('any')
url="https://gitlab.com/surfraw/Surfraw/"
license=('custom')
depends=('perl')
install=$pkgname.install
changelog=$pkgname.changelog
backup=('etc/xdg/surfraw/conf' 'etc/xdg/surfraw/bookmarks')
source=($pkgname-$pkgver.tar.bz2::https://gitlab.com/surfraw/Surfraw/repository/$pkgname-$pkgver/archive.tar.bz2)
sha256sums=('d63c19c382b0e888e442f4106ee6babb5071ce076ab7834028db070814c42556')

build() {
  cd "${srcdir}"/Surfraw-$pkgname-$pkgver-8b7e1d1f4f63d07370953ffc3abe492f943c90a2

  ./prebuild
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package () {
  cd "${srcdir}"/Surfraw-$pkgname-$pkgver-8b7e1d1f4f63d07370953ffc3abe492f943c90a2

  make DESTDIR="${pkgdir}" install

# license
  install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/$pkgname/COPYING
}
